<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'work-exp-work_exp_form-form',
	'enableAjaxValidation'=>false,
	'enableClientValidation'=>true,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($modelEmp); ?>
	
	<div class="row">
		<?php echo $form->labelEx($modelEmp,'employer_name'); ?>
		<?php echo $form->textField($modelEmp,'employer_name'); ?>
		<?php echo $form->error($modelEmp,'employer_name'); ?>
	</div>
	
	<input type="hidden" id="Employer_company_cityID_hidden" name="Employer_company_cityID_hidden" value="">
	
	<div class="row">
		<?php echo $form->label($modelEmp,'company_cityID'); ?>
		
		<?php
							$this->widget('zii.widgets.jui.CJuiAutoComplete', array(
		     			 		'name'=>'Employer[company_cityID]',
		      			 		'id'=>'Employer_company_cityID',
								'value'=>'',
		      					'source'=>'js: function(request, response) {
		   						 $.ajax({
		        					url: "'.$this->createUrl('/user_register/SecondRegister/GetLocation').'",
		        					dataType: "json",
		        					data: {
		            				term: request.term,
		            				state: $("#job_location_stateID_hidden").val(),           				
		        					},
		        					success: function (data) {
		                			response(data);
		        						}
		    						})
		 						}',
								//$this->createUrl('search/searchloc'),
		     			 		'options'=>array(
		                  		'showAnim'=>'fold',
								'minLength'=>'2',
		                  		'select'=> 'js:function(event, ui) {
		                  		$("#Employer_company_cityID").val(ui.item.value);
		                  		$("#Employer_company_cityID_hidden").val(ui.item.id);
		                  		
		                  		}'
								),
		                  		'htmlOptions'=>array('size'=>'40','class'=>'restaurant'),      
							 ));
						
							Yii::app()->clientScript->registerScript('custom_loc_search1','	
			    			$("#Employer_company_cityID").data( "autocomplete" )._renderItem = function( ul, item ) {
			    					return $( "<li></li>" ) .data( "item.autocomplete", item ) .append( "<a><h6>" + item.value + "</h6></a>" ) .appendTo(ul);
			 					
							};');
						?>
		
		
	</div>

	<div class="row">
		<?php echo $form->labelEx($modelEmp,'company_profile'); ?>
		<?php echo $form->textField($modelEmp,'company_profile'); ?>
		<?php echo $form->error($modelEmp,'company_profile'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($modelEmp,'role'); ?>
		<?php echo $form->textField($modelEmp,'role'); ?>
		<?php echo $form->error($modelEmp,'role'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($modelEmp,'duration_yr'); ?>
		<?php echo $form->dropDownList($modelEmp,'duration_yr',ApplicationConfig::getYearValue('0','20'), array('empty' => 'Select value')); ?>
		<?php echo $form->error($modelEmp,'duration_yr'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($modelEmp,'duration_month'); ?>
		<?php echo $form->dropDownList($modelEmp,'duration_month',ApplicationConfig::getYearValue('0','11'), array('empty' => 'Select value')); ?>
		<?php echo $form->error($modelEmp,'duration_month'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($modelEmp,'CTC'); ?>
		<?php echo $form->textField($modelEmp,'salary'); ?>
		<b>in rupees</b>
		<?php echo $form->error($modelEmp,'salary'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($modelEmp,'industry'); ?>
		<?php echo $form->textField($modelEmp,'industry'); ?>
		<?php echo $form->error($modelEmp,'industry'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton('Submit'); ?>
		<?php echo CHtml::link('Skip',ApplicationConfig::getURL("user_register", "secondRegister", "projDet"),array()); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->